import React from "react";
import { Carousel } from "antd-mobile";
import Link from "components/Link";
import Loading from "components/Loading";
import p from "assets/images/s.gif";
import s from "./index.scss";
export default ({ carouselList }) => {
  if(carouselList.length==0){
    return <div></div>
  }
  return (
    <div className={`${s.carouselHeight}`}>
      <Carousel autoplay infinite className={`${s.carouselHeight}`}>
        {carouselList.map((item, index) => {
          return (
            <Link href={item.imgUrl} key={index}>
              <div className={`${s.carouselItem}`} key={index}>
                <img src={item.imgPath} />
              </div>
            </Link>
          );
        })}
      </Carousel>
    </div>
  );
};
